home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / TAWUG / TAWUG Disk No. 53 (SHK) / TAWUG53.shk / APW.FILE.FORMAT (.txt) next >
AppleWorks Document  |  1987-06-29  |  31KB  |  562 lines

  1. O=====|====|====|====|====|====|====|====|====|====|====|====|====|====|====|===
  2. LThe following information is from "Scarlett," December, 1985, a publication O
  3. Mof the Big Red Apple Club, 1105 S. 13th St., #102, Norfolk, NE 68701.  Their *
  4. source of this information is not known.
  5. AppleWorks File Formats
  6. NThis document describes the file formats for AppleWorks and /// E-Z Pieces as I
  7. Gof 2/3/84.  This is not confidential information, and may be copied as 
  8. necessary.
  9. KPLEASE!!! At the request of the product manager... If you receive requests M
  10. Kfor this info from a developer, please let us know who, what for, etc., so O
  11. Mthat we can inform the product manager.  The reason for this request is that O
  12. Mthe product manager is very interested in marketing this product, and if fun L
  13. Jthings are being done with the files, he'd like to know about it so maybe K
  14. Ithey could get together on the product.  Thanks for your support in this     
  15. matter.
  16. JThis document may be revised from time to time to correct errors, clarify B
  17. ambiguous definitions, or to report changes in the file formats.
  18. Definitions
  19. LLSB:     The least significant byte of a word.  It is also the "left byte," E
  20.     Cthe "first byte off the disk," and the "lower address in memory."  >
  21. As you can see, we're going to try to explain our buzzwords.
  22. NMSB:     The most significant byte of a word.  Its address will be one higher E
  23.     Cthan the address of the LSB, in memory, and on disk.  If the total <
  24. value of a word is less than 256D, this byte will be zero.
  25. MRL:     Data base multiple record layout.
  26. SRL:     Data base single record layout.
  27. RAC:     Review/Add/Change screen.
  28. N1W:      Shorthand for "one word."  You will also see references to bytes, in 
  29. the form "3B," for example.
  30. N1BI:     One byte integer.  Values from 0 to 255 decimal.  A value of decimal 
  31. 50 will be stored as 32H.
  32. K1WI:     One word integer.  Bit 80 of the LSB has a value of 128 decimal.  G
  33.     EBit 80 of the MSB is the sign bit.  Bit 01 of the MSB has a value of 
  34. 256 decimal.
  35. Boolean: A single byte that has 0H (false) or 1H (true).
  36. NString:  A 1BI followed by the number of characters shown in the value of the 
  37. ProDOS:  All references to ProDOS apply equally to SOS.
  38. DB:      AppleWorks and/or /// E-Z Pieces Data Base.
  39. SS:      AppleWorks and/or /// E-Z Pieces Spreadsheet.
  40. WP:      AppleWorks and/or /// E-Z Pieces Word Processor.
  41. AW:      AppleWorks and/or /// E-Z Pieces.
  42. IBit 80:  All bits are referred to by their hexadecimal value.  80 is the .
  43. leftmost bit in a byte, 01 is the rightmost.
  44. L"+"      All addresses within an area will be relative to the first byte of F
  45.     Dthe area.  For example, the first byte of the area will be referred 4
  46. to as "Byte +0," the 10th byte would be "Byte +9."
  47. MHex/dec: All hexadecimal numbers will be shown with a trailing H as in 1CH.  E
  48.     CDecimal numbers may sometimes be shown with a trailing D.  Numbers "
  49. without a D or an H are decimal.
  50. Disk Directory Information
  51. You may wish to refer to Apple's SOS Reference Manual, Volume 1, page 100.
  52. Three file types are reserved for AW files:
  53. File type 19H  Data Base
  54. File type 1AH  Word Processor
  55. File type 1BH  Spreadsheet
  56. LThe volume/subdirectory auxiliary type word (+1FH) is used by AW to control K
  57. Iupper/lower case display of file names.  Bit 80 of the LSB refers to the I
  58. Gfirst character of the file name, bit 02 of the MSB refers to the 15th 
  59. character, and so on.
  60. AW performs the following steps when it saves one of its files to disk:
  61. 1.   Zero all 16 bits of the auxiliary type word.
  62. L2.   Examine the file name for lower case letters.  If one is found, change E
  63. Cto "1" the corresponding bit in auxiliary type word and change the 
  64. letter to upper case.
  65. K3.   Examine the file name for spaces.  If a space is found, change to "1" G
  66. Ethe corresponding bit auxiliary type word, and change the space to a     
  67. period.
  68. LWhen files are read from disk, the file name and auxiliary type information P
  69. Nfrom the directory "file entry" are used to determine which characters should A
  70. be lower case, and which periods should be displayed as spaces.
  71. KIf you use the auxiliary type bytes for a different purpose, AW will still P
  72. Ndisplay the file names, but it is likely that the wrong letters will be lower 
  73. case.
  74. Data Base Files
  75. KData Base files start with a variable length header, followed by 600 bytes J
  76. Hfor each report format (if any), the "standard values" record, and then 0
  77. variable length information for each "record."
  78. KThe header contains category names, record selection rules, counts, screen P
  79. Npositioning information and all other information that is not specific to one     
  80. record.
  81. L+000 - +001  1W1 that is the number of bytes in the remainder of the header B
  82. record.  Use this count for your next ProDOS read from the disk.
  83. +002 - +029  Ignore these bytes.
  84. K+030         Cursor direction when Return is pressed in SRL.  1H: Order in =
  85. ;which you defined categories, or 2H: Left to right, top to     
  86. bottom.
  87. N+031         What direction should the cursor go when you press Return in the 
  88. MRL?  D)own or R)ight.
  89. +032 - +033  Ignore these bytes.
  90. M+034         Style of display that Review/Add/Change was using when the file 
  91. was saved: R: SRL.  /: MRL.
  92. +035         1BI Number of categories per record.  Values from 01H to 1EH.
  93. +036 - +037  1WI Number of records in file.
  94. +038         1BI number of reports in this file, maximum of 8.
  95. +039 - +041  Ignore these bytes.
  96. L+042 - +071  1BI for each of up to 30 columns, showing the number of spaces @
  97. >used for this column on the MRL.  Be sure that you understand B
  98. @that categories may have been rearranged on the MRL.  Byte +042 +
  99. refers to the leftmost column on the MRL.
  100. +072 - +077  Ignore these bytes.
  101. K+078 - +107  For up to 30 categories on the MRL, the defined category that A
  102. ?appears in each position.  Byte +078 is the leftmost column of C
  103. Athe MRL, and has a value of 01H to 1EH that defines which of the A
  104. ?category names appears in this position.  These numbers change 0
  105. as a result of changing the layout of the MRL.
  106. +108 - +113  Ignore these bytes.
  107. M+114 - +143  1BI.  For up to 30 categories on the SRL, the horizontal screen B
  108. @position.  These are changed as a result of changing the layout B
  109. @of the SRL.  AW makes sure that these entries, and the vertical B
  110. @screen positions, are kept in order from left to right with top 
  111. to bottom.
  112. +144 - +149  Ignore these bytes.
  113. M+150 - +179  1BI.  For up to 30 categories on the SRL, which of the category ?
  114. =names appears in this position.  These change as a result of >
  115. <changing the SRL.  This number refers to the category names 
  116. listed below.
  117. +216 - +221  Ignore six bytes.
  118. M+222         1BI.  Number of categories on MRL.  Will be less than, or equal =
  119. ;to the number of categories in the file.  SRL displays all 7
  120. categories, so there is no equivalent number for SRL.
  121. I+223 - +224  1WI.  For first line of RAC selection rules.  Zero means no @
  122. >selection rules.  Any other value refers to the category name +
  123. that is tested.  MSB will always be zero.
  124. J+225 - +226  1WI.  Category name for second line of RAC selection rules.  )
  125. Zero means that there is only one line.
  126. N+227 - +228  1WI.  Category name for third line of RAC selection rules.  Zero %
  127. means that there is no third line..
  128. L+229 - +230  1WI.  For first line of RAC rules, which of the tests is to be ?
  129. applied.  1 means "equals," 2 means "greater than" and so on.
  130. +231 - +232  Test for second line of rules, if any.
  131. +233 - +234  Test for third line, if any.
  132. +235 - +236  1WI.  Continuation code for first line: 1:And, 2:Or, 3:Through.
  133. +237 - +238  1WI.  Continuation code for second line.
  134. N+239 - +240  1WI.  Continuation code for third line.  Not possible, so always 
  135. zero.
  136. L+241 - +272  String, max length 30 bytes.  Comparison information for first 
  137. line RAC selection rules.
  138. +273 - +304  Comparison for 2nd line.
  139. +305 - +336  Comparison for 3rd line.
  140. +337 - +356  Ignore these six bytes.
  141. N+357 - +378  Name of the first category.  A string, maximum length 20 bytes.  @
  142. >If the file has only one category, the header record will end 
  143. here.
  144. K+379 - +400  Name of the second category, if any. This area will not be on 2
  145. the header record if there is only one category.
  146. K+401 ...     Additional 22 byte entries for all remaining categories.  The B
  147. @size of the header record depends on the number of categories.  1
  148. Space is not maintained past the last category.
  149. NReport Records follow the header record.  One of the header record categories P
  150. Ntells you how many report records to expect.  The number will be from 0 to 8. 0
  151. Each report record is 600 bytes, and contains:
  152. +000 - +019  String (max 19) Report name.
  153. K+020 - +052  Column width (1BI) for up to 33 columns a tables style report B
  154. @format.  Byte +020 is for the leftmost column on a tables style B
  155. @report.  There can be up to 30 categories from the file, plus 3 
  156. more calculated columns.
  157. N             For labels style report formats, the value is a 1BI that has the =
  158. ;horizontal position of this category, relative to the left     
  159. margin.
  160. +053 - +055  Skip three bytes.
  161. N+056 - +088  For tables style: Number of spaces to be printed at the right of 
  162. justified columns.
  163. N             For labels style: Vertical position on the report for each of up B
  164. @to 30 categories.  1BI.  A value of 1 means that category is on $
  165. first line of labels style report.
  166. +089 - +091  Skip 3 bytes.
  167. M+092 - +124  For up to 33 columns of tables style: Values for 1 to 30D refer @
  168. >to which category name appears in this column on the report.  B
  169. @Values of 80H, 81H and 82H are the three calculated categories, 
  170. from left to right.
  171. J             For labels style: Same as tables style, minus the calculated 
  172. categories.
  173. +125 - +127  Skip the three columns.
  174. N+128 - +160  For up to 33 columns of table style: 99H means no foot totals, 0 =
  175. thru 4 means the number of decimal places for a foot total.
  176. K             For labels style:  For up to 30 categories on report, boolean 2
  177. whether or not category names are to be printed.
  178. +161 - +163  Skip these three bytes.
  179. N+164 - +196  For up to 33 columns of tables style:  99H means left justified, A
  180. 0H through 4H means right justified with 0 to 4 decimal places.
  181. M             For up to 30 categories of labels style: Boolean whether or not ?
  182. =to float (OA-J) this category up against the category to its 
  183. left.
  184. +197 - +199  Skip three bytes.
  185. H+200         1BI.  Number of categories on report.  Includes calculated 
  186. categories, if any.
  187. N+201         Tables style.  If there is a least one calculated category, this A
  188. ?is a 1BI containing values from 1H to 33D: which column of the     
  189. report.
  190. L             Labels style: 1BI. Values from 3H to 21D.  Position of line on 9
  191. the screen that says "Each record will print nn lines."
  192. G+202         Tables style: Same as +201, but for the second calculated 
  193. category, if any.
  194.              Labels style: Unused.
  195. F+203         Tables style: Same as +201, but for the third calculated 
  196. category, if any.
  197.              Labels style: Unused.
  198. H+204         Tables style only: If there is a group total column, a 1BI B
  199. @stating which of the category names is used as a basis.  Values 
  200. from 1D to 30D.
  201. L+205         Platen width value, in 10ths of an inch.  For example, a value <
  202. of 8.0 inches entered by the user will show as 80D or 50H.
  203. +206         Left margin value.  All inches values are in 10ths.
  204. +207         Right margin value.
  205. +208         Characters per inch.  1BI.
  206. +209         Paper length value.  10ths of an inch.
  207. +210         Top margin value.
  208. +211         Bottom margin value.
  209. +212         Lines per inch.  6H or 8H.  1BI.
  210. +213         Not relevant.  Probably always a "C".
  211. +214         Type of report format.  H:tables style, V:labels style.
  212. H+215         Spacing: S(ingle, D(ouble, or T(riple.  Expect these three $
  213. letters even in European versions.
  214. +216         Print report header.  Boolean.
  215. M+217         Tables style: If user has specified group totals, Boolean: just 
  216. print the group totals.
  217. K+218         Labels style: Boolean, omit line when all entries on line are 
  218. blank.
  219. N+219         Labels style: Boolean, keep number of lines the same within each     
  220. record.
  221. +220 - +301  80 byte string.  Title line, if any.
  222. F+302 - +323  Tables style.  20 byte string.  Name of first calculated 
  223. category, if any.
  224. I+324 - +355  Tables style.  30 byte string.  Calculation rules for first 
  225. calculated category, if any.
  226. M+356 - +409  Tables style.  Name and rules for third calculated category, if 
  227. N+464 - +477  If user has specified "Send special codes to printer," this as a (
  228. 13 byte string containing those codes.
  229. +478         Boolean: Print a dash when an entry is blank.
  230. L+479 - +592  Record selection rules.  Exact same format as described in the 
  231. header record.
  232. +593 - +599  Unused.
  233. LData records follow the report records.  The first data record contains the L
  234. Jstandard values.  Each following data record corresponds to one data base 
  235. "record."
  236. LThese records contain all of the categories within one stream of data.  The O
  237. Mcategory entries are in the same order that the category names appear in the 
  238. header record.
  239. KBytes +0 and +1 are a Word that contains a count of the number of bytes in 
  240. the remainder of the record.
  241. KByte +2 of each record will always be a control byte.  Other control bytes N
  242. within each record define the contents of the record.  Control bytes may be:
  243. K01 - 7FH     This is a count of the number of following bytes that are the 
  244. contents of a category.
  245. J81 - 9EH     This (minus 80) is a count of the number of categories to be 7
  246. skipped.  For example, 82H means skip two categories.
  247. FFH          This indicates the end of the record.
  248. NThe information in individual categories may have some special coding so that 1
  249. date and time entries can be arranged (sorted).
  250. Date entries will have the following format:
  251. +000         C0H (192D).  Identifies a date entry.
  252. +001 - +002  ASCII year code, like 84.
  253. +003         ASCII month code.  A means January, L means December.
  254. +004 - +005  ASCII day of the month.
  255. Time entries will have the following format:
  256. +000         D4H (212D).  Identifies a time entry.
  257. M+001         ASCII hour code.  A means 00 (the hour after after midnight). X %
  258. means 23, the hour before midnight.
  259. +002 - +003  ASCII minute code.  Values from 00 to 59.
  260. This is the end of the data base file layouts.
  261. Word Processor Files
  262. KWord Processor files start with a 300 byte header, followed by a number of @
  263. variable length line records, one for each line on the screen.
  264. +000 - +003  Not used
  265. +004         4FH is always here.
  266. +005 - +084  Tab stops. Either = or |
  267. +085         Zoom switch.  Boolean.
  268. +086 - +089  Four bytes not used.
  269. M+090         Boolean, whether file is currently paginated, i.e., whether the 
  270. page break lines are showing.
  271. L+091         Minimum left margin that should be added to the margin that is @
  272. >appearing on the screen.  This is normally one inch, shown in 
  273. 10ths of an inch, 10 or 0AH.
  274. N+092 - +249  Not used.  More or less reserved for "mail merge" feature.  (May 
  275. be used in version 2.0?)
  276. F+250 - +299  Available.  Will Never be used by AppleWorks. If you are B
  277. @creating AW WP files, you can use this area to keep information $
  278. that is important to your program.
  279. LLine records are of three different types.  The first line record after the M
  280. K300 byte header corresponds to line 1, the next is line 2, and so on.  The N
  281. Lfirst two bytes of each line record contain enough information to establish 
  282. the type.
  283. NCarriage return line records have a D0H in byte +001. Byte +000 is a one byte J
  284. Hinteger between 0 and 79 that is the horizontal screen position of this 
  285. carriage return.
  286. NCommand line records are formatting commands that appear on the screen in the M
  287. Kform -------Double Space, for example.  These can be identified by a value  
  288. greater than D0H in byte +001.
  289. They are:(
  290. Byte +001 Command            Byte +000
  291. D8H       Platen width       10ths of an inch/
  292. D9H       Left margin        10ths of an inch/
  293. DAH       Right margin       10ths of an inch/
  294. DBH       Chars per inch     One byte integer)
  295. DCH       Proportional-1     No meaning
  296. DDH       Proportional-2/
  297. DEH       Indent             One byte integer
  298. DFH       Justify
  299. E0H       Unjustify
  300. E1H       Center/
  301. E2H       Paper length       10ths of an inch/
  302. E3H       Top margin         10ths of an inch/
  303. E4H       Bottom margin      10ths of an inch/
  304. E5H       Lines per inch     One byte integer
  305. E6H       Single space
  306. E7H       Double space
  307. E8H       Triple space
  308. E9H       New page
  309. EAH       Group begin
  310. EBH       Group end
  311. ECH       Page header
  312. ECH       Page footer-
  313. EEH       Skip lines         One byte count/
  314. EFH       Page number        One byte integer
  315. F0H       Pause each page
  316. F1H       Pause here5
  317. F2H       Set marker         One byte marker number9
  318. F3H       Page number        One byte integer (add 256)3
  319. F4H       Page break         One byte page number9
  320. F5H       Page break         One byte integer (add 256)9
  321. F6H       Page break         One byte integer (break in3
  322.                              middle of paragraph)<
  323. F7H       Page break         One byte integer (add 256, in3
  324.                              middle of paragraph)
  325. FFH       End of file
  326. Text records are the lines where text has been typed.  The format is:
  327. M+000 - +001  Word. Number of bytes following this word. Since the maximum is A
  328. ?about 80, byte +001 is always zero.  Use byte +001 to identify 
  329. text lines.
  330. J+002         Screen column for the first text character.  Usually will be @
  331. >zero, but may vary as a result of left margin, centering, and 
  332. indent commands.
  333. J+003         80 bit: If on, there is a carriage return on the end of this $
  334. line.  If off, no carriage return.
  335.              Remaining 7 bits: Number of bytes of text following this byte.
  336. I+004 - nnn  Actual text bytes.  Consists of Ascii characters and special <
  337. :codes.  The special codes are values from 01H to 1FH, and '
  338. indicate special formatting features.
  339.        Code    Meaning
  340. 01H     Begin boldface
  341. 02H     Boldface end
  342. 03H     Superscript begin
  343. 04H     Superscript end
  344. 05H     Subscript begin
  345. 06H     Subscript end
  346. 07H     Underline begin
  347. 08H     Underline end
  348. 09H     Print page number
  349. 0AH     Enter keyboard
  350. 0BH     Sticky space
  351. This is the end of the word processor file layout.
  352. Spreadsheet files
  353. JSpreadsheet files start with a 300 byte header record that contains basic O
  354. Minformation about the file, including column widths, printer options, window #
  355. definitions, and standard values.
  356. +000 - +003  Skip 4 bytes.
  357. +004 - +130  1BI containing the column width for each column.
  358. +131         Order of recalculation.  ASCII R or C.
  359. +132         Frequency of recalculation. ASCII A or M.
  360. +133 - +134  Last row referenced.  Word.
  361. +135         Last column referenced. 1BI.
  362. J+136         Number of windows: ASCII 1: just one window, S: side by side %
  363. windows, T: top and bottom windows.
  364. +137         Boolean.  If there are two windows, are they synchronized?
  365. L+138 - +161  The next 20 (approx) variables are for the current window.  If @
  366. >there is only one window, it is the current window.  If there A
  367. ?are two windows, the current window is the window that had the 
  368. cursor in it.
  369. N+138         Window standard format for label cells.  2H: left justified, 3H:  
  370. right justified, 4H: centered.
  371. N+139         Window standard format for value cells.  2H: fixed, 3H: dollars, +
  372. 4H: commas, 5H: percent, 6H: appropriate.
  373. M+140         Top screen line used by this window.  This is the line that the A
  374. ?=====A=========B==== appears on.  Normally 1H unless there are 
  375. top and bottom windows.
  376. M+142         Leftmost screen column used by this window.  This is the column B
  377. @that the hundreds digit of the row number appears in.  Normally +
  378. 0H unless there are side by side windows.
  379. N+143 - +144  Top, or first, row appearing in titles area.  This will probably '
  380. be zero if there are no "top" titles.
  381. M+145         Leftmost, or first, column appearing in left side titles area.  >
  382. This will probably be zero if there are no left side titles.
  383. K+146 - +147  Last row appearing in top titles area.  This will probably be "
  384. zero if there are no top titles.
  385. H+148         Last column appearing in left side titles area.  This will 4
  386. probably be zero if there are no left side titles.
  387. J+149 - +150  Top, or first, row appearing in the body of the window.  The C
  388. Abody is defined as those rows that are on the screen, but not in 
  389. the titles area.
  390. +151         Leftmost, or first, column appearing in the body of the window.
  391. I+152         The screen line that the top body row goes on.  Normally 2H 9
  392. unless there are top titles, or top and bottom windows.
  393. H+153         Leftmost screen column used for the leftmost body column.  <
  394. :Normally 4H unless there are side titles, or side by side 
  395. windows.
  396. +154 - +155  Bottommost, or last, row appearing in this window.
  397. +156         Rightmost, or last, column appearing in this window.
  398. K+157         The screen line that the last body row goes on.  Normally 13H 0
  399. (19D) unless there are top and bottom windows.
  400. L+158         The rightmost screen column used by this window.  Normally 4EH .
  401. (78D) unless there are side by side windows.
  402. M+159         1BI.  Number of horizontal screen locations used to display the <
  403. :body columns.  Normally 48H (72D), because 8 columns of 9 A
  404. ?characters each are the standard display.  This is affected by @
  405. side by side windows, side titles, and variable column widths.
  406. J+160         Boolean.  Rightmost column is not fully displayed.  This can C
  407. Aonly happen when the body portion of the window is narrower than #
  408. the width of a particular column.
  409. N+162 - +185  Window information for the secondary window.  This is meaningful B
  410. @only if there are two windows.  This is the information for the 7
  411. 5window that the cursor is not currently in.  See the 4
  412. descriptions for the current window (+138 - +161).
  413. +186 - +212  Not currently used.
  414. +213         Boolean, cell protection is on or off.
  415. +214         Not currently used.
  416. L+215         Platen width value, in 10ths of an inch.  For example, a value <
  417. of 8.0 inches entered by the user will show as 80D or 50H.
  418. +216         Left margin value.  All inches values are in 10ths.
  419. +217         Right margin value.
  420. +218         Characters per inch.  1BI.
  421. +219         Paper length value.  10ths of an inch.
  422. +220         Top margin value.
  423. +221         Bottom margin value.
  424. +222         Lines per inch.  6H of 8H.  1BI.
  425. H+223         Spacing: S(ingle, D(ouble, or T(riple.  Expect these three %
  426. letters, even in European versions.
  427. N+224 - +237  If user has specified "Send special codes to printer," this is a (
  428. 13 byte string containing those codes.
  429. +238         Boolean: Print a dash when an entry is blank.
  430. +239         Print report header.  Boolean.
  431. +240         Boolean.  Zoomed in to show formulas.
  432. +241 - +249  Reserved for future use.
  433. G+250 - +299  Available.  Will Never be used by AppleWorks.  If you are B
  434. @creating AW SS files, you can use this area to keep information $
  435. that is important to your program.
  436. LRow records contain a variable amount of information about each row that is N
  437. Lnon-blank.  Each row record contains enough information to completely build 
  438. one row of the spreadsheet:
  439. +000 - +001  Number of additional bytes to read from disk.
  440. +002 - +003  Word.  Row number.
  441. M+004         Beginning of actual information for the row.  This byte of each =
  442. ;record will always be a control byte.  Other control bytes A
  443. ?within each record define the contents of the record.  Control C
  444. Abytes may be 01-7FH.  This is a count of the number of following .
  445. bytes that are the contents of a cell entry.
  446. M             81-9EH.  This (minus 80) is a count of the number of columns to 7
  447. be skipped.  For example, 82H means skip two columns.
  448.              FFH.  This indicates the end of the row.
  449. NCell entries contain all the information that is necessary to build one cell. 
  450. There are several types:
  451. LValue constants are cells that have a value that cannot change.  This means D
  452. that someone typed a constant into the cell, 3.14159, for example.
  453. +000         Bit 80 is always on.
  454. H             Bit 40 on means that if the value is zero, display a blank A
  455. ?instead of a zero.  This is for pre-formatted cells that still 
  456. have no value.
  457.              Bit 20 is always on.
  458.              Bit 10 on means that labels cannot be typed into this cell.
  459.              Bit 08 on means that values cannot be typed into this cell.
  460.              Bits 04, 02, and 01 specify the formatting for this cell:
  461. 1: Use spreadsheet standard
  462. 2: Fixed
  463. 3: Dollars
  464. 4: Commas
  465. 5: Percent
  466. 6: Appropriate
  467. +001         Bit 80: always zero.
  468.              Bit 40: always zero.
  469.              Bit 20: always zero.
  470. K             Bits 04, 2, 01.  Number of decimal places for fixed, dollars, 
  471. commas, or percent formats.
  472. +002         Not used.
  473. +003 - +010  8 byte Apple SANE numerics double format floating point number.
  474. MValue formulas are cells that contain information that has to be evaluated.  O
  475. formulas like AA17+@sum(r19..r21), and @Error are examples.  Specific format:
  476. +000         Bit 80 is always on.
  477. H             Bit 40 on means that if the value is zero, display a blank A
  478. ?instead of a zero.  This is for pre-formatted cells that still 
  479. have no value.
  480.              Bit 20 is always off.
  481.              Bits 10, 08, 04, 02, and 01 are the same as value constants.
  482. +001         Bit 80: always on.
  483. K             bit 40: On indicates that the last evaluation of this formula 
  484. resulted in an @NA.
  485. K             Bit 20: On indicates that the last evaluation of this formula 
  486. resulted in an @Error.
  487.               Bits 04, 02, 01 same as value constants.
  488. N+002 - +009  8 byte SANE double floating point number that is the most recent 
  489. evaluation of this cell.
  490. N+010 - nnn   Various control bytes that are "tokens" representing the formula )
  491. that was typed in by the user they are:
  492. Byte   Means
  493. DCH    @Sum
  494. DDH    @Avg
  495. DEH    @Choose
  496. DFH    @Count-
  497. E0H    @Error (followed by 3 bytes of zero)!
  498. E1H    Reserved for future @IRR
  499. E2H    @If
  500. E3H    @Int
  501. E4H    @Lookup
  502. E5H    @Max
  503. E6H    @Min.
  504. E7H    @NA (followed by three bytes of zero)
  505. E8H    @NPV
  506. E9H    @Sqrt
  507. EAH    @Abs
  508. EBH    Not currently used
  509. ECH    <> (not equal)&
  510. EDH    >= (greater than or equal to)#
  511. EEH    <= (less than or equal to)
  512. EFH    = (equals)
  513. F0H    > (greater than)
  514. F1H    < (less than)
  515. F2H    , (comma) 
  516. F3H    ^ (exponentiation sign)
  517. F4H    ) (right parenthesis)
  518. F5H    - (minus)
  519. F6H    + (plus)
  520. F7H    / (divide)
  521. F8H    * (multiply)
  522. F9H    ( (left parenthesis)!
  523. FAH    - (unary minus. Ex: -A3) 
  524. FBH    + (unary plus. Ex: +A3)
  525. FCH    ... (dots),
  526. FDH    Next 8 bytes are SANE double number0
  527. FEH    Next 3 bytes are row, column reference.
  528. KTwo of the codes require special information.  Code FDH indicates that the M
  529. Knext 8 bytes are a SANE numerics package "double" precision floating point B
  530. number.  All constants with formulas are carried in this manner.
  531. Code FEH indicates that the next three bytes point at a cell:
  532. +000         FEH
  533. I+001         Column reference.  Add this 1BI to the column number of the A
  534. ?current cell to get the column number of the pointed at cell.  9
  535. This value is sometimes negative, but Add always works.
  536. K+002 - +003  Row reference.  Word.  Add this word to the row number of the ?
  537. =current cell to the row number of the pointed at cell.  This 4
  538. value is sometimes negative, but Add always works.
  539. LPropagated label cells are labels that place one particular ASCII character 7
  540. in each position of a window.  Handy for underlining.
  541. +000         Bit 80 is always zero.
  542.              Bit 40 is meaningless.
  543.              Bit 20 is always on.
  544.              Bit 10 and bit 08 are protection, just like value cells.
  545.              Bits 04, 02, 01 are meaningless.  Put a 1 here.
  546. M+001         This is the actual character that is to be put in each position 
  547. in the cell.
  548. MRegular label cells contain alphanumeric information, such as heading, names K
  549. and other descriptive information that is not the basis for calculations.
  550. +000         Bits 80, 40, 20 are always zero.
  551.              Bits 10 and 08 are same as value cells.
  552.              Bits 04, 02, and 01 determine cell formatting:
  553. 01: Use spreadsheet standard formatting
  554. 02: Left justify
  555. 03: Right justify
  556. 04: Center
  557. L+001 - +nnn  ASCII characters that actually display.  The actual length was C
  558. Adefined earlier in the word that contained the "actual number of 
  559. bytes to read from disk."
  560. This is the end of the spreadsheet file format.
  561. This is the end of AppleWorks file formats.
  562.